home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / lcppb.zip / LCPP04.ZIP / CRTSTAT.CPP < prev    next >
C/C++ Source or Header  |  1991-07-04  |  647b  |  25 lines

  1. // crtstat.cpp -- Get CRT's mode and number of columns
  2.  
  3. //#include <stream.hpp>
  4. #include <iostream.h>
  5. #include <dos.h>
  6. #include <iomanip.h>
  7.  
  8. main()
  9. {
  10.   char far *mode = (char far *)MK_FP(0x0040, 0x0049);
  11.   int far *cols = (int far *)MK_FP(0x0040, 0x004a);
  12.  
  13. //  cout << "CRT startup mode = " << dec(*mode) << '\n';
  14.   cout << "CRT startup mode = " << dec << *mode << '\n';
  15.   cout << "CRT columns      = " << *cols << '\n';
  16. }
  17.  
  18.  
  19. // Copyright (c) 1990 by Tom Swan. All rights reserved
  20. // Revision 1.00    Date: 08/27/1990   Time: 03:23 pm
  21.  
  22. // Revision 1.01    Date: 07/03/1991   Time: 04:00 pm
  23. // Converted for Borland C++ 2.0
  24.  
  25.